package me.raih.service;

import me.raih.pojo.po.Wares;
import me.raih.pojo.vo.PageBean;

import java.util.List;

/**
 * @Author Raih
 * @Time 2020/11/28  15:29
 */
public interface WaresService {
    /**
     * 通过商品类别筛选出需要的商品
     * @param waresCategory
     * @return List<Wares>
     */
    List<Wares> findWares(String waresCategory);

    PageBean<Wares> findWaresByPage(int currentPage, int pageSize);

    PageBean<Wares> findWaresByPageAndName(int currentPage, int pageSize,String name,String no,String modifyMan,String status);

    /**
     * 尝试添加一个商品
     * @param wares
     * @return
     */
    boolean canAddWares(Wares wares);

    Wares findWaresByNo(String no);

    boolean canChangeStatus(String no,String status);

    boolean updateWares(Wares wares);



    PageBean<Wares> findWaresByCategoryNo(int categoryNo, int currentPage, int pageSize);


    PageBean<Wares> findWaresByWaresName(String name, int currentPage, int pageSize);


    PageBean<Wares> searchWares(int currentPage, String waresName);

    boolean deleteWares(String no);

    int findWaresNumber();

    int findTodayWaresNumber();

    int findYesterdayWaresNumber();

    int findCurrWeekWaresNumber();

    int findCurrMonthWaresNumber();

    PageBean<Wares> findDelWaresByPageAndName(int currentPage, int allPage, int pageSize, String param);

    Wares findDelWaresByNo(String no);

    boolean addDelWares(Wares wares);
}
